import { request } from '@/utils';

export function getUserProfile<T = any>() {
  return request<T>({
    url: '/user/profile',
    method: 'get'
  });
}

export function updateUserProfile<
  T = any,
  U = {
    nickname: string;
    title: string;
    company: string;
    homePage: string;
    introduction: string;
    avatar: string;
  }
>(data: U) {
  return request<T>({
    url: '/user/profile',
    method: 'put',
    data
  });
}

export function getSts<T = any>() {
  return request<T>({
    url: '/user/sts',
    method: 'get'
  });
}

export function getVIPPayList<T = any>() {
  return request<T>({
    url: '/user/vip/pay/list',
    method: 'get'
  });
}
